package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysUserBillingRecordMapper;
import com.ruoyi.system.domain.SysUserBillingRecord;
import com.ruoyi.system.service.ISysUserBillingRecordService;

/**
 * 用户账单记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-13
 */
@Service
public class SysUserBillingRecordServiceImpl implements ISysUserBillingRecordService 
{
    @Autowired
    private SysUserBillingRecordMapper sysUserBillingRecordMapper;

    /**
     * 查询用户账单记录
     * 
     * @param recordId 用户账单记录主键
     * @return 用户账单记录
     */
    @Override
    public SysUserBillingRecord selectSysUserBillingRecordByRecordId(Long recordId)
    {
        return sysUserBillingRecordMapper.selectSysUserBillingRecordByRecordId(recordId);
    }

    /**
     * 查询用户账单记录列表
     * 
     * @param sysUserBillingRecord 用户账单记录
     * @return 用户账单记录
     */
    @Override
    public List<SysUserBillingRecord> selectSysUserBillingRecordList(SysUserBillingRecord sysUserBillingRecord)
    {
        return sysUserBillingRecordMapper.selectSysUserBillingRecordList(sysUserBillingRecord);
    }

    /**
     * 新增用户账单记录
     * 
     * @param sysUserBillingRecord 用户账单记录
     * @return 结果
     */
    @Override
    public int insertSysUserBillingRecord(SysUserBillingRecord sysUserBillingRecord)
    {
        sysUserBillingRecord.setCreateTime(DateUtils.getNowDate());
        return sysUserBillingRecordMapper.insertSysUserBillingRecord(sysUserBillingRecord);
    }

    /**
     * 修改用户账单记录
     * 
     * @param sysUserBillingRecord 用户账单记录
     * @return 结果
     */
    @Override
    public int updateSysUserBillingRecord(SysUserBillingRecord sysUserBillingRecord)
    {
        return sysUserBillingRecordMapper.updateSysUserBillingRecord(sysUserBillingRecord);
    }

    /**
     * 批量删除用户账单记录
     * 
     * @param recordIds 需要删除的用户账单记录主键
     * @return 结果
     */
    @Override
    public int deleteSysUserBillingRecordByRecordIds(Long[] recordIds)
    {
        return sysUserBillingRecordMapper.deleteSysUserBillingRecordByRecordIds(recordIds);
    }

    /**
     * 删除用户账单记录信息
     * 
     * @param recordId 用户账单记录主键
     * @return 结果
     */
    @Override
    public int deleteSysUserBillingRecordByRecordId(Long recordId)
    {
        return sysUserBillingRecordMapper.deleteSysUserBillingRecordByRecordId(recordId);
    }
}
